/*
 * bt_express.h
 *
 *  Created on: 2012-1-3
 *      Author: lina
 */

#ifndef BT_EXPRESS_H_
#define BT_EXPRESS_H_

#include "bt.h"

/*
 * express := () || (char, express, express)
 */

enum
{
	SIGN_BLANK	= ' ',
	SIGN_BEGIN	= '(',
	SIGN_END	= ')',
	SIGN_SEP	= ',',
};

bt_node_t * express2bt(const char * express);

char * bt2express(bt_node_t * bt, char * buff, size_t buff_len);

int express2bt_r(const char ** express, bt_node_t ** bt);
int bt2express_r(bt_node_t * bt, char * buff, size_t * buff_len);


#endif /* BT_EXPRESS_H_ */
